package com.anmai.crawler1.dao;

import com.anmai.crawler1.entity.TagBean;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TagDao {
    int deleteByPrimaryKey(Integer id);

    int insert(TagBean record);

    int insertSelective(TagBean record);

    TagBean selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TagBean record);

    int updateByPrimaryKey(TagBean record);

    @Select("select * from tags where status <> #{status,jdbcType=INTEGER}")
    @Results({
            @Result(property = "updateTime", column = "update_time"),

            @Result(property = "createTime", column = "create_time"),
    })
    List<TagBean> selectTagsExceptStatus(@Param("status") Integer status);
}